// import axios from "./api.js"
import axios from "@/utils/request"

// 登录验证接口
export function Logovalidate(data) {
    return axios({
        method: "post",
        url: "/login/userName/v2",
        data
    })
}
// 判断token的效性校验
export function checkToKen(data) {
    return axios({
        method: "get",
        url: "/user/checkToken",
        data
    })
}

// 拉取当前用户的权限列表
export function myActions(data) {
    return axios({
        method: "get",
        url: "/user/myActions",
        data
    })
}
// 
export function banner(data) {
    return axios({
        method: "POST",
        url: "/user/apiExtBanner/list",
        data
    })
}

// ROOT拉取所有的角色列表
export function rootjuese(data) {
    return axios({
        method: "post",
        url: "/user/roles/list",
        data
    })
}

// 面包屑
export function user(data) {
    return axios({
        method: "get",
        url: "/user/info",
        data
    })
}

//ROOT管理员列表
export function rootguanli(data) {
    return axios({
        method: "post",
        url: "/user/admin/list",
        data
    })
}

//ROOT管理员列表 角色
export function rootguanliList() {
    return axios({
        method: "post",
        url: "/user/roles/list",
    })
}
//ROOT管理员添加-修改
export function rootmodify(data) {
    return axios({
        method: "post",
        url: "/user/admin/save",
        data
    })
}

//ROOT获取所有的权限列表
export function rootPermissionList(data) {
    return axios({ method: "get", url: "/user/roles/actions", data })
}
//ROOT删除角色
export function rootdeljuese(data) {
    return axios({ method: "post", url: "/user/roles/del", data })
}
//ROOT删管理员
export function rootdelganli(data) {
    return axios({ method: "post", url: "/user/admin/del", data })
}
// CMS单页管理
export function cmsdanye(data) {
    return axios({
        method: "post",
        url: "/user/apiExtPage/list",
        data
    })
}

// CMS公告管理
export function cmsgonggao(data) {
    return axios({
        method: "POST",
        url: "/user/apiExtNotice/list",
        data
    })
}

// CMS 添加 修改
export function cmstiangai(data) {
    return axios({
        method: "POST",
        url: "/user/apiExtPage/save",
        data
    })
}

// CMS 公告删除
export function cmssancu(data) {
    return axios({
        method: "POST",
        url: "/user/apiExtNotice/del",
        data
    })
}

// CMS 单页删除
export function cmssancudan(data) {
    return axios({
        method: "POST",
        url: "/user/apiExtPage/del",
        data
    })
}


//MALL
export function mallfenlei(data) {
    return axios({
        method: "post",
        url: "/user/apiExtShopGoodsCategory/list",
        data
    })
}

// 规格尺寸tab列表接口
export function mallspecifications() {
    return axios({
        method: "post",
        url: "/user/apiExtShopProperty/list",

    })
}
// tab列表每一项的接口请求
export function mallchildsList(data) {
    return axios({
        method: "post",
        url: "/user/apiExtShopProperty/childs",
        data
    })
}

// 商品管理tab列表接口
export function mallmanagement() {
    return axios({
        method: "post",
        url: "user/apiExtShopGoods/list",

    })
}
// tab列表每一项的接口请求
export function mallchildrList(data) {
    return axios({
        method: "get",
        url: "/user/apiExtShopGoodsCategory/info",
        data
    })
}

